package cn.java86.test;

import cn.java86.dao.ExamDao;
import cn.java86.entity.Exam;
import cn.java86.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class QueryExam {
    public static void main(String[] args) {
        SqlSession s = MybatisUtil.get();
        ExamDao mapper = s.getMapper(ExamDao.class);
        List<Exam> all = mapper.findAll();
        for (Exam e : all)
            System.out.println(e);
        MybatisUtil.close(s);
    }
}
